package com.hiof.servercommunication.background.job;

import com.hiof.servercommunication.background.job.managers.AbstractBackgroundThreadManager;
import com.hiof.servercommunication.background.job.managers.AthleteBackgroundThreadManager;
import com.hiof.servercommunication.background.job.managers.SupportBackgroundThreadManager;
import com.hiof.settings.user.TypeOfAttendant;
import com.hiof.settings.user.UserConfiguration;

/**
 * Created by IntelliJ IDEA.
 * User: manish
 * Date: 4/1/12
 * Time: 1:00 PM
 * To change this template use File | Settings | File Templates.
 */
public class BackgroundManagerCreator {
    public static AbstractBackgroundThreadManager createBackgroundManagerFactory() {
        if(UserConfiguration.getInstance().getTypeOfAttendant()==TypeOfAttendant.ATHLETE){
            return AthleteBackgroundThreadManager.getInstance();
        }else if(UserConfiguration.getInstance().getTypeOfAttendant()==TypeOfAttendant.SUPPORT){
            return SupportBackgroundThreadManager.getInstance();
        }else{
            return null;
        }
    }
}
